package ru.agiledev.client;

import ru.agiledev.wikiservice.WiktionaryService;

import javax.xml.namespace.QName;
import javax.xml.ws.Service;
import java.net.URL;

/**
 * Created by a.kirillov
 * Date: 11/14/11 Time: 7:53 PM
 */
public class WSInstanceManager {
    public static WiktionaryService getServiceInstance(URL url){
        //1st argument service URI, refer to wsdl document above
		//2nd argument is service name, refer to wsdl document above
        QName qname = new QName("http://wikiservice.agiledev.ru/", "WiktionaryServiceImplService");

        Service service = Service.create(url, qname);

        WiktionaryService aflRegistry = service.getPort(WiktionaryService.class);

        return aflRegistry;
    }
}
